<!DOCTYPE html>
<html>
    <head>
        <meta charset='UTF-8'>
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <title><?php echo $settings['site_name'] ?> - <?php echo $settings['short_intro'] ?></title>
        <meta name="keywords" content="<?php echo $settings['site_keywords'] ?>" />
        <meta name="description" content="<?php echo $settings['short_intro'] ?>" />
        <?php $this->load->view('common/header-meta'); ?>
    </head>
    <body>
        <?php $this->load->view('common/header'); ?>
        <div class="container">
            <div class="row">
                <div class="col-md-8">
                    <div class="panel">
                        <style>

                            /* 本例子css -------------------------------------- */

                            .slideBox {
                                position: relative;
                                overflow: hidden;
                                margin-top: 0px;
                                /* 设置焦点图最大宽度 */
                            }

                            .slideBox .hd {
                                position: absolute;
                                height: 28px;
                                line-height: 28px;
                                bottom: 0;
                                right: 0;
                                z-index: 1;
                            }

                            .slideBox .hd li {
                                display: inline-block;
                                width: 5px;
                                height: 5px;
                                -webkit-border-radius: 5px;
                                -moz-border-radius: 5px;
                                border-radius: 5px;
                                background: #333;
                                text-indent: -9999px;
                                overflow: hidden;
                                margin: 0 6px;
                            }

                            .slideBox .hd li.on {
                                background: #fff;
                            }

                            .slideBox .bd {
                                position: relative;
                                z-index: 0;
                            }

                            .slideBox .bd li {
                                position: relative;
                                text-align: center;
                            }

                            .slideBox .bd li img {
                                background: url(/static/common/images/loading.gif) center center no-repeat;
                                vertical-align: top;
                                width: 100%;
                                /* 图片宽度100%，达到自适应效果 */
                            }

                            .slideBox .bd li a {
                                -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
                            }


                            /* 去掉链接触摸高亮 */

                            .slideBox .bd li .tit {
                                display: block;
                                width: 100%;
                                position: absolute;
                                bottom: 0;
                                text-indent: 10px;
                                height: 28px;
                                line-height: 28px;
                                background: url(/static/common/images/focusBg.png) repeat-x;
                                color: #fff;
                                text-align: left;
                            }

                        </style>
                        <div class="panel-body">
                            <div id="slideBox" class="slideBox" style="margin-top: 0px;">

                                <div class="bd">
                                    <ul>
                                        <?php foreach ($flash_list as $v): ?>
                                        <li class="">
                                         <a class="pic" href="<?php echo $v['url']; ?>"><img src="<?php echo $v['pic']; ?>" /></a>
                                         <a class="tit" href="<?php echo $v['url']; ?>"><?php echo $v['title']; ?></a>
                                        </li>
                                    <?php endforeach; ?>
                                    </ul>
                                </div>

                                <div class="hd">
                                    <ul></ul>
                                </div>
                            </div>
                            <script type="text/javascript" src="<?php echo base_url('static/common/js/TouchSlide.1.1.js'); ?>"></script>
                            <script type="text/javascript">
                                TouchSlide({
                                    slideCell: "#slideBox",
                                    titCell: ".hd ul", //开启自动分页 autoPage:true ，此时设置 titCell 为导航元素包裹层
                                    mainCell: ".bd ul",
                                    effect: "leftLoop",
                                    autoPage: true, //自动分页
                                    autoPlay: true, //自动播放
                                    interTime: 3500 //自动播放
                                });
                            </script>
                        </div>

                    </div><!-- /.topic list -->
<?php $this->load->view('home_info'); ?>

                </div><!-- /.col-md-8 -->

                <div class="col-md-4">
                    <?php $this->load->view('common/sidebar_login'); ?>
                    <?php $this->load->view('common/sidebar_cates'); ?>

                    <div class="panel panel-default">
                        <div class="panel-heading">
                            <h3 class="panel-title">社区统计</h3>
                        </div>
                        <div class="panel-body">
                            <ul class="list-unstyled">
                                <li>最新会员：<?php echo $stats['last_username'] ?></li>
                                <li>注册会员： <?php echo $stats['total_users'] ?></li>
                                <li>今日话题： <?php echo $stats['today_topics']; ?></li>
                                <li>昨日话题： <?php echo $stats['yesterday_topics']; ?></li>
                                <li>话题总数： <?php echo $stats['total_topics'] ?></li>
                                <li>回复数： <?php echo $stats['total_comments'] ?></li>
                            </ul>
                        </div>
                    </div> 


                    <?php $this->load->view('common/sidebar_ad'); ?>
                    <div class="panel panel-default">
                        <div class="panel-heading">
                            <h3 class="panel-title">友情链接</h3>
                        </div>
                        <div class="panel-body">
                            <ul class="list-unstyled">
                                <li style="width:0; height:0; overflow:hidden;"><a href="http://www.startbbs.com" target="_blank">StartBBS</a></li>
                                    <?php if ($links) { ?>
                                        <?php foreach ($links as $v) { ?>
                                            <?php if ($v['is_hidden'] == 0) { ?>
                                            <li><a href="<?php echo $v['url']; ?>" target="_blank"><?php echo $v['name']; ?></a></li>
                                        <?php } else { ?>
                                            <li>暂无链接</li>
                                        <?php } ?>
                                    <?php } ?>
                                <?php } else { ?>
                                    <li>暂无链接</li>
                                <?php } ?>
                            </ul>
                        </div>
                    </div>
                </div><!-- /.col-md-4 -->

            </div><!-- /.row -->
        </div><!-- /.container -->

        <?php $this->load->view('common/footer'); ?>
        <script>
//            $(function () {
//                var page = 2;
//                $("#getmore").click(function () {
//                    var data;
//                    $.get('<?php echo site_url(); ?>/home/getmore/' + page, function (data) {
//                        page++;
//                        $("#topic_list").append(data);
//                    });
//                    //$("#infolist").after(tr);
//                });
//            });

        </script>

    </body>
</html>